package cn.edu.zut.internship.web.controller.sys;


import cn.edu.zut.internship.bean.sys.Result;
import cn.edu.zut.internship.entity.AuthSysOperator;
import cn.edu.zut.internship.iservice.sys.IOperateService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/operate")
public class OperateController {
    @Reference
    private IOperateService operateService;
    @GetMapping("/search")
    public Result search(){
        Result result = new Result();
        List<AuthSysOperator> operatorList = this.operateService.selectAll();
        result.setBeans(operatorList);
        return result;
    }
}
